package ro.tm.uvt.lp.raccoon.catchGame.entities.agents.actions;

import com.badlogic.gdx.math.Rectangle;

import ro.tm.uvt.lp.raccoon.catchGame.entities.agents.Dog;
import ro.tm.uvt.lp.raccoon.catchGame.entities.perceptions.DogOdor;
import ro.tm.uvt.lp.raccoon.catchGame.environment.Environment;

/**
 * Created by I309540 on 19.01.2015.
 */
public class RaccoonSniffDogRight implements Sniff {


    @Override
    public boolean sniff(float x, float y) {
        for(Dog dog: Environment.INSTANCE.getDogs()){
            if(dog.getOdor().get(4).getBoundingRectangle().overlaps(new Rectangle(x+30,y,40,40))
                    || dog.getOdor().get(0).getBoundingRectangle().overlaps(new Rectangle(x+30,y,40,40)))
                return true;
        }
        return false;
    }
}
